package com.example.lottery.common.exception;

import com.example.lottery.common.errorcode.ErrorCode;
import lombok.Data;

@Data
public class ControllerException extends  RuntimeException{
    private int code;
    private String message;


    public ControllerException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public ControllerException(ErrorCode errorCode) {
        this.code = errorCode.getCode();
        this.message = errorCode.getMessage();
    }

    public ControllerException() {}
}
